package com.wbcs.system.component.application.tree;

import java.util.ArrayList;
import java.util.List;

public class TreeNodeBean
{
    private String id;

    private int parentidx;

    private List<Integer> lstChildIdxs;

    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id=id;
    }

    public int getParentidx()
    {
        return parentidx;
    }

    public void setParentidx(int parentidx)
    {
        this.parentidx=parentidx;
    }

    public List<Integer> getLstChildIdxs()
    {
        return lstChildIdxs;
    }

    public void setLstChildIdxs(List<Integer> lstChildIdxs)
    {
        this.lstChildIdxs=lstChildIdxs;
    }

    public void addChildIdx(int childidx)
    {
        if(this.lstChildIdxs==null) this.lstChildIdxs=new ArrayList<Integer>();
        if(!this.lstChildIdxs.contains(childidx)) this.lstChildIdxs.add(childidx);
    }

}
